package queue.linked_list;


public class ListElement<T> {
    private T value;
    private ListElement next, before;

    public ListElement(T t) {
        this.value = t;
    }

    public ListElement getNext() {
        return next;
    }

    public void setNext(ListElement next) {
        this.next = next;
    }

    public ListElement getBefore() {
        return before;
    }

    public void setBefore(ListElement before) {
        this.before = before;
    }

    public T getValue() {
        return value;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || value.getClass() != o.getClass()) return false;
        if (value != null) return value.equals(o);
        return true;
    }
}
